package org.jackysoft.struts2.admin;
import java.util.Collection;

import javax.annotation.Resource;

import org.apache.struts2.convention.annotation.Namespace;
import org.jackysoft.entity.OfficeDocument;
import org.jackysoft.service.OfficeDocumentService;
import org.jackysoft.struts2.UtilsCRUDAction;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;



@Namespace("/office/document")
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class OfficeDocumentAction extends UtilsCRUDAction<OfficeDocument> {
	/**
	 * 
	 */
	private static final long serialVersionUID = -8585204729280665381L;
	private OfficeDocumentService service;
	private OfficeDocument bean;
	private Collection<OfficeDocument> beans;	
	
	
	public void setBean(OfficeDocument bean){
	     this.bean = bean;
	}
	public OfficeDocument getBean(){
	     return this.bean;
	}
	public void setBeans(Collection<OfficeDocument> beans){
	
	     this.beans = beans;
	}
	public Collection<OfficeDocument> getBeans(){
	     return this.beans;
	}
	
	@Resource
	public void setService(OfficeDocumentService service) {
		this.service = service;
		this.setDataProvider(service);
	}	
	
	public OfficeDocumentService getService(){
	   return this.service;
	}
		
}